package com.zzh.ftp.test;

import java.io.IOException;

import org.apache.commons.net.ftp.FTP;

/**
 * @Des     ftp测试
 * @author	张振华
 * @date	2017年3月28日  下午5:16:25
 * @version v1.0
 */
public class test {
	final static String hostname = "101.201.103.144";
	final static int port = 21;
	final static String username = "root";
	final static String password = "Beijing2017";

	public static void main(String[] args) throws IOException {
		 
			
			FtpHelper fh = new FtpHelper(); 
			String local = "C:/cv/1-夏小为2.txt";
			String remote = "/test/1-夏小为.txt"; 
			if(fh.connect(hostname, port, username, password)){
				System.out.println(fh.upload(local, remote));;
				fh.disconnect();
			 
			  
		
		}
		
	}

}
